package cn.lls.service;

import cn.lls.dto.EmployeeLoginDTO;
import cn.lls.req.emp.ConditionSearchEmployeeExcelReq;
import cn.lls.req.emp.ConditionSearchEmployeeReq;
import cn.lls.req.emp.EMPAccountReq;
import cn.lls.req.emp.EmployeeInfoReq;
import cn.lls.vo.emp.EmployeeInfo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @InterfaceName IEmployeeService
 * @Author 划水艺术家
 * @Date 2022/11/21 23:14
 * @Version 1.0
 **/
public interface IEmployeeService extends IService<EmployeeInfoReq> {


    EmployeeLoginDTO empLogin(EMPAccountReq req);


    /*
    添加员工信息，操作 3张表，加入事务处理
     */
    @Transactional
    void addEmployee(EmployeeInfoReq employeeInfoReq);

    /*
    更改员工信息，操作 3 张表，加入事务处理
     */
    @Transactional
    void updateEmployee(EmployeeInfoReq employeeInfoReq);

    /*
    分页、条件查询员工信息
     */
    IPage<EmployeeInfo> getEmployeeByConditionAndPage(ConditionSearchEmployeeReq conditionSearchEmployeeReq);

    /*
    根据 id 查询员工信息
     */
    EmployeeInfo getEmployeeById(Long employeeId);



    /*
   条件查询员工信息并导出
    */
    List<EmployeeInfo> getEmployeeExcel(ConditionSearchEmployeeExcelReq conditionSearchEmployeeExcelReq);

}
